{% extends "admin/layout.html" %}
{% block title %}
    <title>文章列表</title>
{% endblock %}
{% block main %}
    <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
        <h1 class="h2">类别管理</h1>
    </div>

    <form action="{{ url_for('admin.admin_category') }}" method="POST">
        {{ form.hidden_tag() }}
        <p><a href="{{ url_for('admin.admin_category_list') }}" class="btn btn-lg btn-light">返回列表</a>&nbsp;&nbsp;<!--<button
                class="btn btn-lg btn-dark" type="submit">提交博客
        </button>-->{{ form.submit }}
        </p>
        <div class="col-md-12">
            <div class="form-group">
                {{ form.name.label }}
                {{ form.name }}
{#                <input type="text" class="form-control" id="exampleFormControlInput1" required name="title">#}
                {% for error in form.name.errors %}
                <span style="color: red;">[{{ error }}]</span>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.status.label(for="cate-status") }}
{#                <label for="blogfirst">是否置顶</label>#}
                <div id="cate-status">
                    {% for item in form.status %}
                        <div class="form-check form-check-inline">
                            {{ item() }}
                            {{ item.label }}
                        </div>
                    {% endfor %}
{#                    <div class="form-check form-check-inline">#}
{#                        <input class="form-check-input" type="radio" name="top" id="inlineRadio1"#}
{#                               value="1">#}
{#                        <label class="form-check-label" for="inlineRadio1">【√ 是】</label>#}
{#                    </div>#}
{#                    <div class="form-check form-check-inline">#}
{#                        <input class="form-check-input" type="radio" name="top" id="inlineRadio2"#}
{#                               value="2" checked>#}
{#                        <label class="form-check-label" for="inlineRadio2">【× 否】</label>#}
{#                    </div>#}
                {% for error in form.status.errors %}
                <span style="color: red;">[{{ error }}]</span>
                {% endfor %}
                </div>
            </div>
        </div>
    </form>
{% endblock %}









